<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${message("admin.record.list")} - 766 SMART HOME</title>
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/list.js"></script>
<script type="text/javascript" src="${base}/resources/admin/datePicker/WdatePicker.js"></script>
<script type="text/javascript">
$().ready(function() {

	[@flash_message /]

    $("#excleImport").click(function(){
        var beginDate = $("[name=beginDate]").val();
        var endDate = $("[name=endDate]").val();
        window.location.href="${base}/admin/record/exportXlsRecordInfo.jhtml?beginDate="+beginDate+"&endDate="+endDate;
    });

});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/admin/common/index.jhtml">${message("admin.path.index")}</a> &raquo; 报备列表 <span>(${message("admin.page.total", page.total)})</span>
	</div>
	<form id="listForm" action="list.jhtml" method="get">
		<div class="bar">
			<a href="add.jhtml" class="iconButton">
				<span class="addIcon">&nbsp;</span>${message("admin.common.add")}
			</a>
			<div class="buttonWrap">
				<a href="javascript:;" id="deleteButton" class="iconButton disabled">
					<span class="deleteIcon">&nbsp;</span>${message("admin.common.delete")}
				</a>
				<a href="javascript:;" id="refreshButton" class="iconButton">
					<span class="refreshIcon">&nbsp;</span>${message("admin.common.refresh")}
				</a>
				<div class="menuWrap">
					<a href="javascript:;" id="pageSizeSelect" class="button">
						${message("admin.page.pageSize")}<span class="arrow">&nbsp;</span>
					</a>
					<div class="popupMenu">
						<ul id="pageSizeOption">
							<li>
								<a href="javascript:;"[#if page.pageSize == 10] class="current"[/#if] val="10">10</a>
							</li>
							<li>
								<a href="javascript:;"[#if page.pageSize == 20] class="current"[/#if] val="20">20</a>
							</li>
							<li>
								<a href="javascript:;"[#if page.pageSize == 50] class="current"[/#if] val="50">50</a>
							</li>
							<li>
								<a href="javascript:;"[#if page.pageSize == 100] class="current"[/#if] val="100">100</a>
							</li>
						</ul>
					</div>

                    <a href="javascript:;" id="excleImport" class="button">
                        导出<span class="arrow">&nbsp;</span>
                    </a>
				<span class="input">&nbsp;&nbsp;创建时间：</span>
				[#if beginDate == null]
                    <input type="text" id="beginDate" name="beginDate" class="text Wdate" value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate: '#F{$dp.$D(\'endDate\')}'});">
				[#else]
                    <input type="text" id="beginDate" name="beginDate" class="text Wdate" value="${beginDate}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate: '#F{$dp.$D(\'endDate\')}'});">
				[/#if]
                    -
				[#if endDate == null]
                    <input type="text" id="endDate" name="endDate" class="text Wdate" value="" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate: '#F{$dp.$D(\'beginDate\')}'});">
				[#else]
                    <input type="text" id="endDate" name="endDate" class="text Wdate" value="${endDate}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate: '#F{$dp.$D(\'beginDate\')}'});">
				[/#if]
                    <input type="submit" class="button" id="bt" value="查询" />
				</div>
			</div>

		</div>
		<table id="listTable" class="list">
			<tr>
				<th class="check">
					<input type="checkbox" id="selectAll" />
				</th>
				<th>
					<a href="javascript:;" class="sort" name="createDate">更新时间</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="recordUserName">报备人</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="recordUserPhone">报备人联系方式</a>
				</th>
				<th>
					<span>${message("admin.common.handle")}</span>
				</th>
			</tr>
			[#list page.content as adminRecord]
				<tr>
					<td>
						<input type="checkbox" name="ids" value="${adminRecord.id}" />
					</td>
					<td>
						${adminRecord.modifyDate}
					</td>
					<td>
						${adminRecord.recordUserName}
					</td>
					<td>
						${adminRecord.recordUserPhone}
					</td>
					<td>
						<a href="edit.jhtml?id=${adminRecord.id}">[${message("admin.common.edit")}/${message("admin.common.view")}]</a>
					</td>
				</tr>
			[/#list]
		</table>
		[@pagination pageNumber = page.pageNumber totalPages = page.totalPages]
			[#include "/admin/include/pagination.ftl"]
		[/@pagination]
	</form>
</body>
</html>